from machine import Pin
import utime
LED1=Pin(0,Pin.OUT)
LED2=Pin(1,Pin.OUT)
PIR=Pin(16,Pin.IN,Pin.PULL_DOWN)
while True:
LED1.value(PIR.value())
if PIR.value()==1:
print("Motion Detected ! ! ")
LED1.value(1)
LED2.value(0)
else:
print("NO Motion Detected ! ! ")
LED2.value(1)
LED1.value(0)
utime.sleep(0.5)